package com.bjpowernode.springboot.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

@Controller
public class MyController {
    @RequestMapping(value = "/expression")
    public String index(Model model, HttpServletRequest request){
        model.addAttribute("username","lisi");
        request.getSession().setAttribute("data","sessionDate");
        return "index";
    }
}
